Update/content with code editing#62
Merged
Merged
Conversation
- 桌面左右分栏(源码 | 操作+结果),<912px 自动上下 - 源码进入视口懒加载(IntersectionObserver),减少并发请求 - 编辑源码改为 toggle:再点保存编辑内容并切回只读预览 - 有 ARM 源码时加「源码/ARM 精简源码」tab,看 ARM 汇编自动对照 - 本期纯文本等宽,shiki 语法高亮留作后续
- 只读源码用 shiki/bundle/web runtime 高亮,复用 github-light/dark 双主题 - 动态 import + 单例懒加载,不污染首屏 bundle(shiki 已随 vitepress 安装,无需加依赖) - 双主题经 html.dark + --shiki-light/dark 变量自动切换,无需刷新 - 高亮异步:未就绪先纯文本 fallback,就绪后替换为着色 HTML - 编辑态 textarea 保持纯文本(编辑场景不高亮)
- 14 篇 OnlineCompilerDemo 配齐(补 map、重写 initializer、新建 8 个) - vol34567 拆成 vol3/vol4/vol5/vol6/vol7,vol3 重新连续编号 01-14 - 同步更新所有 sourcePath(含 EN)
- 25 个文件重译(glm-4.6),vol3 14 篇 EN 齐全含 OnlineCompilerDemo - EN source-path 同步到 code/examples/vol3-7 新结构 - EN vol3 index 升级到 14 篇逻辑顺序
- check_quality --fix 补全 reading_time_minutes + frontmatter 字母序规范化 - 修 vol3 deque/map 的 internal_link 缺 .md(4 处 CN+EN) - EN 翻译同步 25 文件# Please enter the commit message for your changes. Lines starting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(vol3): 标准库卷·容器部分完整重构 + 在线编译器接入 + code/examples 目录拆分
概述
update/content_with_code_editing相对main的累积变更。核心是把 vol3「标准库深入」卷的容器部分从零散草稿,重构成一套完整、可交互、中英双语同步的教程,并理顺了code/examples目录结构和 frontmatter 基础设施。涉及 717 个文件(+13940 / −11504),8 个 commit。
主要变更
1. vol3 容器部分完整重构(14 篇)
order——侧边栏由sidebar.ts按文件名数字排序,重命名后导航顺序 = 阅读顺序2. 在线编译器(OnlineCompilerDemo)
3. code/examples 目录重构
vol34567(vol3-7 五卷源码混一起)拆成vol3/vol4/vol5/vol6/vol7,与 vol1/vol2 统一4. 基础设施
validate_frontmatter.py加'26',同步 CLAUDE.md / frontmatter 规则(新标准容器篇标[23, 26])reading_time_minutes补全 + frontmatter 字母序规范化(check_quality --fix).md扩展5. i18n(EN 翻译同步)
code/examples/vol3-7结构验证(CI 本地全量模拟,全绿)
新增/重写源码均
g++ -std=c++20/23/26实跑编译通过。mdspan 用m[i, j](多维 operator[],P2128)而非早期 Kokkos 的m(i, j)——实跑抓出的真 bug。注意
run-compiler=g162 -std=c++26(inplace_vector 是 C++26);若 Godbolt 该 id 不可用,可在组件「编译条件」面板手动切换